import http from '@/utils/request.js'
import backURL from '@/api/router/requestUrl.js'

//登录接口
export const userLoginService = ( { jobNumber, password ,remember}) =>
    http.post(backURL.login,{ jobNumber, password,remember })

//验证邮箱接口
export const validateEmailService = (  email) => {
    console.log(email)
    return http.post(backURL.resetEmail,{ email })
}

//开始重置密码接口
export const startResetService = ( email,code,sessionId) =>
    http.post(backURL.startReset,{ email,code,sessionId })
//重置密码接口
export const doResetService = ( email,password) => {
    console.log(email+"密码"+password)

    return http.post(backURL.doReset,{email,password})
}
//修改信息接口
export const resetFirstInformationService = ( email,password,jobNumber,first) =>
    http.post(backURL.resetInformation,{email,password,jobNumber,first})
export const resetInformationService = ( email,password,jobNumber) =>
    http.post(backURL.resetInformation,{email,password,jobNumber})

//获取所有用户接口
export const getAllUser = () => http.get(backURL.user)
